package first.group.ssh.encrypt;

import java.security.NoSuchAlgorithmException;
import javax.crypto.Cipher;
import javax.crypto.NoSuchPaddingException;

public class Aes128Ctr extends Encryption {
    @Override
    public String getName() {
        return "aes128-ctr";
    }
    
    @Override
    public String getKeyAlgorithm() {
        return "AES";
    }

    @Override
    public Cipher newCipher() {
        try {
            return Cipher.getInstance("AES/CTR/NoPadding");
        } catch (NoSuchAlgorithmException | NoSuchPaddingException ex) {
            throw new RuntimeException(ex);
        }
    }

    @Override
    public int blockLength() {
        return 16;
    }

    @Override
    public int keyLength() {
        return 16;
    }
}
